// © 2009 Microsoft Corporation.  All rights reserved.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.InformationSecurity.ISRM.TaskManagment.Classes;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace Microsoft.InformationSecurity.ISRM.TaskManagment.WebService
{
    /// <summary>
    /// Interface for the notifications WCF service
    /// </summary>
    [ServiceContract()]
    public interface INotificationsService
    {
        /// <summary>
        /// Adds a notification content to the system
        /// </summary>
        /// <param name="notificationContent">Notification content to add</param>
        [OperationContract()]
        int AddNotificationContent(NotificationContent notificationContent);

        /// <summary>
        /// Updates a specific notification content
        /// </summary>
        /// <param name="notificationContent">Notification content to update</param>
        [OperationContract()]
        void UpdateNotificationContent(NotificationContent notificationContent);

        /// <summary>
        /// Deletes a specific notification content
        /// </summary>
        /// <param name="notificationContentID">Identifier of the notification content to be deleted</param>
        /// <param name="personID">PersonID of the user doing the action</param>
        [OperationContract()]
        void DeleteNotificationContent(int notificationContentID, int personID);

        /// <summary>
        /// Returns the list of all notification content
        /// </summary> 
        /// <returns>List of Notification Contents</returns>
        [OperationContract()]
        List<NotificationContent> GetNotificationContents();

        /// <summary>
        /// Creates a notification schedule and returns the identifier.
        /// </summary>
        /// <param name="notificationSchedule">New Notification Schedule</param>
        /// <returns>Notification Schedule Identifier</returns>
        [OperationContract()]
        int AddNotificationSchedule(NotificationSchedule notificationSchedule);
        /// <summary>
        /// Updates a specific notification schedule
        /// </summary>
        [OperationContract()]
        void UpdateNotificationSchedule(NotificationSchedule notificationSchedule);
        /// <summary>
        /// Removes a notification schedule from the system
        /// </summary>
        [OperationContract()]
        void DeleteNotificationSchedule(int notificationScheduleID, int personID);

        /// <summary>
        /// Set the specified notification schedule as the default one in the system
        /// </summary>
        [OperationContract()]
        void SetDefaultNotificationSchedule(int notificationScheduleID, string username, int personID);
        
        /// <summary>
        /// Returns a list of schedules for a specific user.
        /// </summary>
        /// <returns>List of Notification Schedules</returns>
        [OperationContract()]
        List<NotificationSchedule> GetNotificationSchedules();

        /// <summary>
        /// Returns a single notification schedule
        /// </summary>
        /// <param name="scheduleID">Identifier of the schedule</param>
        /// <returns></returns>
        [OperationContract()]
        NotificationSchedule GetNotificationSchedule(int scheduleID);

        /// <summary>
        /// Returns the default notification schedule from the database.
        /// </summary>
        /// <returns>Default Notification Schedule ID</returns>
        [OperationContract()]
        int GetDefaultNotificationSchedule();
    }
}
